﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class admin_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Cells[12].Attributes.Add("onclick", "javascript:return confirm('您确定要删除该记录吗?\\n\\n您将无法恢复！')");
        }

    }
    //protected void Button1_Click(object sender, EventArgs e)
    //{
    //    HtmlGenericControl _insert_new_data =(HtmlGenericControl)ListView1.FindControl("insert_new_data");
    //    _insert_new_data.Attributes["visible"] = "true";
    //    //UpdatePanel1.FindControl("insert_new_data")
    //}
    protected void ListView1_ItemInserting(object sender, ListViewInsertEventArgs e)
    {
        DropDownList _dropdownlist = (DropDownList)ListView1.InsertItem.FindControl("DropDownList_companyid_insert");
        e.Values["companyid"] = _dropdownlist.SelectedValue;
        e.Values["brand"] = "";
        //if (_dropdownlist.SelectedValue == "中国电信集团公司")
        //{
        //    e.Values["E_company"] = "CHINA TELECOM corporation";
        //}
        //else if (_dropdownlist.SelectedValue == "中国移动通信集团公司")
        //{
        //    e.Values["E_company"] = "China Mobile Communication Corporation(CMCC)";
        //}
        //else
        //{
        //    e.Values["E_company"] = "China United Telecommunications Co. Ltd";
        //}

    }
    protected void Button_Search_Click(object sender, EventArgs e)
    {
        HiddenField_top.Value = "1000000";
        HiddenField_company.Value = DropDownList_company.SelectedValue.Trim();
        //HiddenField_firstnum.Value = DropDownList_code.SelectedValue.Trim();
    }
}
